/**
 * Created by user on 2017/9/20.
 */
import { createStore, applyMiddleware } from 'redux';
import reduxThunk from 'redux-thunk';
import rootReducer from '../reducers';
import createHistory from 'history/createHashHistory';
import { routerMiddleware } from 'react-router-redux';

// Create a history of your choosing (we're using a browser history in this case)
const history = createHistory()

// Build the middleware for intercepting and dispatching navigation actions
const middleware = routerMiddleware(history);

const initState = {};
const store = createStore(
    rootReducer,
    initState,
    applyMiddleware(reduxThunk,middleware)
);
export default store;